import parser
import argparse
# yapf: disable
# parser = argparse.ArgumentParser()
# parser.add_argument("--train_set", type=str, required=True, help="The full path of train_set_file")
# parser.add_argument("--dev_set", type=str, required=True, help="The full path of dev_set_file")
# parser.add_argument("--save_dir", default='./checkpoint', type=str, help="The output directory where the model checkpoints will be written.")
# parser.add_argument("--max_seq_length", default=256, type=int, help="The maximum total input sequence length after tokenization. "
#     "Sequences longer than this will be truncated, sequences shorter will be padded.")
# parser.add_argument('--max_steps', default=-1, type=int, help="If > 0, set total number of training steps to perform.")
# parser.add_argument("--train_batch_size", default=32, type=int, help="Batch size per GPU/CPU for training.")
# parser.add_argument("--eval_batch_size", default=128, type=int, help="Batch size per GPU/CPU for training.")
# parser.add_argument("--learning_rate", default=5e-5, type=float, help="The initial learning rate for Adam.")
# parser.add_argument("--weight_decay", default=0.0, type=float, help="Weight decay if we apply some.")
# parser.add_argument("--epochs", default=3, type=int, help="Total number of training epochs to perform.")
# parser.add_argument("--eval_step", default=100, type=int, help="Step interval for evaluation.")
# parser.add_argument('--save_step', default=10000, type=int, help="Step interval for saving checkpoint.")
# parser.add_argument("--warmup_proportion", default=0.0, type=float, help="Linear warmup proption over the training process.")
# parser.add_argument("--init_from_ckpt", type=str, default=None, help="The path of checkpoint to be loaded.")
# parser.add_argument("--seed", type=int, default=1000, help="Random seed for initialization.")
# parser.add_argument('--device', choices=['cpu', 'gpu'], default="gpu", help="Select which device to train model, defaults to gpu.")
# parser.add_argument("--rdrop_coef", default=0.0, type=float, help="The coefficient of"
#     "KL-Divergence loss in R-Drop paper, for more detail please refer to https://arxiv.org/abs/2106.14448), if rdrop_coef > 0 then R-Drop works")
#
# args = parser.parse_args()
# yapf: enable


# 2建立解析对象
parser = argparse.ArgumentParser()

# 3增加属性：这里的bool是一个可选参数，返回给args的是 args.bool
parser.add_argument("--bool", help="Whether to pirnt sth.")

# 4属性给与args实例： parser中增加的属性内容都在args实例中
args = parser.parse_args()

# 如果有输入内容，则打印1
print(args.bool)
if args.bool:
    print('bool = 1')
